import Vue from 'vue'
import VueRouter from 'vue-router'
import tabBer from '@/components/tabBer'


Vue.use(VueRouter)
import liuhao from "../router/liuhao.js"
import guojiejie from "../router/guojijie.js"
import lixiao from "../router/lixiao.js"
import oneDayRouter from "../router/oneDayRouter.js"
import wangmz from "../router/wangmz.js"
import zhangchu from "../router/zhangchu.js"
import wangjiaxuan from "../router/wangjiaxuan.js"
const routes = [
  {
    path: '/login',
    component: () => import('@/views/login'),
  },
  {
	path: '',
	component: tabBer,
	redirect: 'index',
	children: [
	  {
	    path: 'index',
	    component: () => import('@/views/index'),
	    name: 'index',
	  },
	  {
	    path: 'order',
	    component: () => import('@/views/order'),
	    name: 'order',
	  },
	  {
	    path: 'service',
	    component: () => import('@/views/service'),
	    name: 'service',
	  },
	  {
	    path: 'me',
	    component: () => import('@/views/me'),
	    name: 'me',
	  },
	]
  },
  ...liuhao,
  ...guojiejie,
  ...lixiao,
  ...oneDayRouter,
  ...wangmz,
  ...zhangchu,
  ...wangjiaxuan
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
